package com.renjibo.sharkerwave;

import android.app.Application;

import com.facebook.stetho.Stetho;
import com.orhanobut.logger.LogLevel;
import com.orhanobut.logger.Logger;

import org.greenrobot.eventbus.EventBus;
import org.xutils.x;

/**
 * 任继波
 * Created by Administrator on 2017/4/7.
 */

public class MyApplication extends Application {
    public static MyApplication mApplication;
    public static MyApplication getInstance(){
        return mApplication;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        mApplication = this;
        Stetho.initializeWithDefaults(this);
        com.blankj.utilcode.util.Utils.init(this);

        x.Ext.init(this);
        x.Ext.setDebug(BuildConfig.DEBUG); // 是否输出debug日志, 开启debug会影响性能.

        Logger
                .init("sharker")                 // default PRETTYLOGGER or use just init()
                .methodCount(3)                 // default 2
                .hideThreadInfo()               // default shown
                .logLevel(LogLevel.FULL)        // default LogLevel.FULL
                .methodOffset(2)                // default 0
        ;


//        EventBus eventBus = EventBus.builder().addIndex(new MyEventBusIndex()).build();
    }
}
